package com.td.module.member.controller.admin.appMemberUser.vo;

import com.td.framework.desensitize.core.slider.annotation.MobileDesensitize;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

import static com.td.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

/**
* app用户 Base VO，提供给添加、修改、详细的子 VO 使用
* 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
*/
@Data
public class AppMemberUserBaseVO {

    @ApiModelProperty(value = "用户昵称", required = true, example = "JinRui")
    @NotNull(message = "用户昵称不能为空")
    private String nickname;

    @ApiModelProperty(value = "用户类别", example = "1")
    private Integer type;

    @ApiModelProperty(value = "状态", required = true, example = "2")
    private Integer status;

    @ApiModelProperty(value = "手机号", required = true)
    @NotNull(message = "手机号不能为空")
    @MobileDesensitize
    private String mobile;

    @ApiModelProperty(value = "最后登录时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime loginDate;

    @ApiModelProperty(value = "是否实名认证")
    private Integer isAuth;

    @ApiModelProperty(value = "农户id", example = "7065")
    private Long farmerId;

}
